<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class mmenu extends MY_Model {

    var $theme_data = array(
        'layout_main' => 'layout',
        'left' => 'include/leftcp',
    );
    public $mytable = "menu";
    public $primaryKey = "men_id";
    public $resCode = "MENU";
	
	public $type = array(
		'url' => 'Đường dẫn url',
		'cat' => 'Danh mục'
	);
	
    function __construct() {
        parent::__construct();
		
    }

    function field() {
		$fieldData = array();
	$fieldData['men_name'] = '';
	$fieldData['men_type'] = '';
	$fieldData['men_parent'] = 0;
	$fieldData['men_value'] = '';
	$fieldData['men_order'] = 0;
	$fieldData['men_status'] = 1;
	return $fieldData;
    }
	
	function get_parent() {
		$parent = 0;
		$this->db->order_by('men_order asc');
		return $this->gets(array(
			'men_parent' => 0
		));
		
		
	}
	
}

?>